package com.niit.beans;

import java.util.List;

public class User {

    private int salary;
    private String name;
    private Dept dept;// 被依赖项 new出来 并且 放进来

    private List<String> friends;
    public User(int salary, String name,
                Dept dept,List<String> friends) {
        this.salary = salary;
        this.name = name;
        this.dept = dept;
        this.friends = friends;
    }

    public void testDept(){
        dept.teambuilding();
        System.out.println("salary:"+this.salary);
        System.out.println("name:"+this.name);
    }
}
